package com.hwadee.teachingprocessmanagementsystem.controller.student;

import com.hwadee.teachingprocessmanagementsystem.dto.student.StudentExamArrangementDto;
import com.hwadee.teachingprocessmanagementsystem.dto.student.StudentExamResultDto;
import com.hwadee.teachingprocessmanagementsystem.entity.Student;
import com.hwadee.teachingprocessmanagementsystem.service.student.StudentService;
import com.hwadee.teachingprocessmanagementsystem.util.result.DataResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: 学生考务管理控制器，负责学生考务管理信息的请求
 * @Author: Jukomu
 * @Package: com.hwadee.teachingprocessmanagementsystem.controller.student
 * @Project: TeachingProcessManagementSystem
 * @name: ExamController
 * @Date: 2024/7/12-9:03
 * @Filename: ExamController
 */
@RestController("StudentExamController")
@RequestMapping("student/exam")
public class ExamController {
    @Autowired
    private StudentService studentService;
    /**
     * 考试安排查询接口
     * @return
     */
    @RequestMapping("my-exams/arrangement")
    public DataResult arrangement(@RequestParam("student-number") String studentNumber){
        Student student = new Student();
        student.setStudentNumber(studentNumber);
        StudentExamArrangementDto studentExamArrangementDto = this.studentService.getStudentExamArrangementDto(student);
        return DataResult.successByData(studentExamArrangementDto);
    }

    /**
     * 考试提醒接口
     * @return
     */
    @RequestMapping("my-exams/reminder")
    public DataResult reminder(){
        return DataResult.succ();
    }

    /**
     * 准考证打印接口
     * @return
     */
    @RequestMapping("admit-card")
    public DataResult admitCard(){
        return DataResult.succ();
    }

    /**
     * 考试成绩查询接口
     * @return
     */
    @RequestMapping("results")
    public DataResult results(@RequestParam("student-number") String studentNumber){
        Student student = new Student();
        student.setStudentNumber(studentNumber);
        StudentExamResultDto studentExamResultDto = this.studentService.getStudentExamResultDto(student);
        return DataResult.successByData(studentExamResultDto);
    }

    /**
     * 补考安排接口
     * @return
     */
    @RequestMapping("makeup-arrangement")
    public DataResult makeupArrangement(){
        return DataResult.succ();
    }

    /**
     * 重修选课接口
     * @return
     */
    @RequestMapping("retake")
    public DataResult retake(){
        return DataResult.succ();
    }

    /**
     * 重修考试安排接口
     * @return
     */
    @RequestMapping("retake-arrangement")
    public DataResult retakeArrangement(){
        return DataResult.succ();
    }

    /**
     * 学业预警提醒接口
     * @return
     */
    @RequestMapping("warning-reminder")
    public DataResult warningReminder(){
        return DataResult.succ();
    }
}
